<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
    <style>
         .setColor{
            color: rgb(167, 106, 106);
        }
        .setColorRed{
            color: red;
        }
        .setFontSize{
            font-size: 50px;
        }
        .setBorder{
            border: 1px solid seagreen;
        }
    </style>
</head>
<body>
    <div id="root">
        <div :class="{setBorder:isSetBorder,setColor:isSetColor,setFontSize:isSetFontSize}">传统css样式</div>
        <div :class="[activeBorder,activeColor,activeFontSize]">vue修改的css样式</div>
        <div :style="{color:activeColor, fontSize:size+'px'}">内联style样式</div>
        <div :style="[mycolor, mysize]">内联stylecss样式修改</div>
    </div>
    <script>
        new Vue({
            el:'#root',
            data() {
                return {
                    //传统css样式
                    isSetBorder:true,
                    isSetColor:true,
                    isSetFontSize:true,
                    //class属性样式
                    activeBorder:'setBorder',
                    activeColor:'setColorRed',
                    activeFontSize:'setFontSize',
                    //内联style样式
                    activeColor:'skyblue',
                    size:55,
                    //内联样式
                    mycolor:{color:'green', border:'1px solid red'},
                    mysize:{fontSize:'80px'}
                }
            },
        })
    </script>
</body>
</html>